Week 7 · Laplace
Back
WEEK 7: BIOINSTRUMENTATION

From Fourier to Laplace, understanding Transfer Functions.

A breif introduction to transfer functions. Here we'll start off by looking at the fourier & laplace transform, and how they can be used to understand dynamical systems.

signals & systems complex analysis control theory
scroll
01Practical Example

Car Suspension

Imagine a car driving over a bump, the chassis lifts, and then it oscillates until it settles. A good suspension settles very quickly, a bad one keeps oscillating for a while, and a really bad one never settles at all.

Watch the chassis's vertical position $y(t)$ after the bump. Flip between the three designs.

Many of you are familiar with the fourier transform, but can it tell us which design is stable? Can it even describe the moment of impact?

The Fourier transform is great for describing steady oscillations, but cannot describe transient events. For example, it cannot describe the blow-up of an unstable system, what happens at the moment of impact or how the system responds after this event.

Quarter-car suspension · chassis displacement z(t)

good design · critically damped

02The complex exponential

How do we encode rotation and magnitude?

Before any transform, just sit with this: $e^{j\omega t}$ is a single point racing around a circle. Its real shadow traces out cosine, its imaginary shadow traces out sine.

How fast it spins is the frequency, the radius is the amplitude, and where it starts on the circle is the phase. Pretty much everything that follows in this lecture is just variations on this one object.

Worth knowing: complex exponentials are the eigenfunctions of linear time invariant systems. Push one through a filter and the same exponential comes out the other side, just rescaled. That is the whole reason these transforms work.

1.20
0.85
real · cos imaginary · sin phasor tip
Complex plane
03the s-plane, visualised

Every point in the plane is a different exponential.

Section 02 kept us on the unit circle, where $e^{j\omega t}$ spins forever at a constant radius. Step off that circle to a general $s = \sigma + j\omega$, and $e^{st}$ gains a growth rate as well as a frequency.

Each tile on the left plots the real part $\mathrm{Re}\{e^{st}\} = e^{\sigma t}\cos(\omega t)$ for the $s$ at the centre of that tile. Click any tile to see the full complex trajectory of $e^{st}$ on the right.

This is the intuition behind pole locations later on: every pole of a transfer function picks out a single tile of this grid, and the mode it contributes to the response looks exactly like the curve in that tile.

$e^{st}$ $=$ $e^{(\sigma + j\omega)\,t}$ $=$ $e^{\sigma t}$ envelope $\cdot$ $e^{j\omega t}$ oscillation
s-plane · Re{e^{st}} · click a tile
e^{st} · complex trajectory
04Understanding the Fourier Transform

How to think about the Fourier Transform

Before understanding the intergral, lets first look at the two functions inside of it.

1. As we showed above, the complex exponential $e^{-j2\pi f t}$ is just a point walking around the unit circle. Whose radius is 1 and whose angle is given by $-2\pi f t$.

2. If we multiply that circle by a real number $g$, you will get a circle whos radius is scaled by $g$. However, if $g$ varies as a function of time, e.g. $g(t)$, you now have a circle whose radius changes with time. The radius of the circle scales in and out as a function of time.

3. Let time actually advance. The point traces a spiral around the origin, its radius driven by $g(t)$ and its angle driven by the exponential. That spiral is the signal, wrapped around the complex plane.

1.00
signal $g(t)$ wound path time axis → angle
$F(f) = \displaystyle\int_{-\infty}^{\infty}$$g(t)$$\cdot$$e^{-j 2\pi f t}$$\,dt$
straight line of time · bent into a disc
stage 1 · drawing the signal
05the winding machine

Fourier is a winding machine.

Multiplying a signal $g(t)$ by $e^{-2\pi j f t}$ winds it around the origin of the complex plane at frequency $f$.

Consider the centroid of the resulting curve. For most values of $f$, the curve loops around the origin with approximate symmetry, so positive and negative contributions cancel and the centroid remains close to zero. If $f$ coincides with a frequency component of $g(t)$, this symmetry is broken: contributions accumulate on one side of the plane and the centroid is displaced.

This displacement is, up to normalisation, the Fourier transform itself. The integral $\int g(t)\, e^{-2\pi j f t}\, dt$ is the (unnormalised) centroid of the wound curve, and peaks in $|F(f)|$ correspond to winding frequencies at which the displacement is maximal.

0.40
signal $g(t)$
wound · $g(t)\,e^{-2\pi j f t}$
f = 0.40 Hz
|F(f)| · center of mass path
06the wall

The Fourier transform fails on unbounded signals.

Now consider the signal $e^{0.3 t}\cos(\omega_0 t)$. The wound curve spirals outward without bound, its centroid fails to converge, and the defining integral diverges.

The Fourier transform is defined only for signals that remain integrable over all time, i.e. those in $L^1$ or $L^2(\mathbb{R})$. Transients, the responses of unstable systems, and causal signals switched on at a finite time generally fall outside this class.

This motivates a natural modification: attenuate the signal prior to winding, so as to restore integrability.

0.30
0.60

For $a < 0$, the signal decays and the wound curve spirals inward; the transform is well-defined. For $a > 0$, the wound curve is unbounded and the integral fails to converge.

signal $e^{a t}\cos(\omega_0 t)$
wound shape
diverges
07the fix

The Laplace transform generalises Fourier via a complex frequency.

Replace the Fourier kernel $e^{-j\omega t}$ with $e^{-st}$, where $s = \sigma + j\omega \in \mathbb{C}$. The kernel factorises as $e^{-st} = e^{-\sigma t}\,e^{-j\omega t}$.

The second factor is the familiar Fourier winder; the first is a real exponential weighting that attenuates the signal for $\sigma > 0$ and amplifies it for $\sigma < 0$. Setting $\sigma = 0$ recovers the Fourier transform exactly.

Applied to the divergent signal of the previous section, the transform converges whenever $\sigma$ exceeds the signal's growth rate. The set of $s \in \mathbb{C}$ for which the integral converges is termed the region of convergence (ROC), and is an intrinsic part of the transform's specification.

0.00
1.00
0.30

For this signal the ROC is the half-plane $\sigma > a$. The s-plane panel indicates convergence in green.

$g(t)$ · tamed by $e^{-\sigma t}$
wound shape
bounded · ROC ok
s-plane · (σ, ω)
08transfer functions

Poles and zeros characterise the transfer function.

For a linear time-invariant system with input $x(t)$ and output $y(t)$, the ratio of their Laplace transforms defines the transfer function, $H(s) = Y(s)/X(s)$.

For the systems considered here, $H(s)$ is a rational function of $s$, and therefore admits the factored form

$$H(s) \;=\; k \, \frac{(s - z_1)(s - z_2)\cdots}{(s - p_1)(s - p_2)\cdots}.$$

The roots of the numerator are the zeros $\{z_i\}$; the roots of the denominator are the poles $\{p_i\}$. Together with the scalar gain $k$, these two sets of complex numbers determine $H(s)$ completely.

At $s = z_i$ the numerator vanishes, so $H(z_i) = 0$ and the system annihilates that mode. At $s = p_i$ the denominator vanishes, so $|H(p_i)| \to \infty$ and the response is unbounded. The frequency response, resonant behaviour, and stability of the system are consequently all determined by the location of its poles and zeros in the $s$-plane.

$X(s)$
input
$H(s)$
$Y(s)$
output
block diagram · $Y(s) = H(s)\,X(s)$
low-pass · single pole
s-plane · poles × · zeros ○
input $x(t)$ → output $y(t)$
09connecting the two

The Fourier transform is a restriction of the Laplace transform.

Varying both $\sigma$ and $\omega$ simultaneously, the magnitude $|F(s)|$ defines a surface over the complex plane. Poles appear as singularities at which the surface diverges; zeros appear as points at which it vanishes.

The Fourier transform is the restriction of this surface to the imaginary axis $\sigma = 0$. This slice represents the system's steady-state response to pure sinusoidal inputs $e^{j\omega t}$: the magnitude of $F(j\omega)$ gives the gain and its argument gives the phase at frequency $\omega$. Evaluating $F(s)$ on any other vertical line $\sigma = \sigma_0$ yields a parallel cross-section, which represents the response to exponentially modulated sinusoids $e^{\sigma_0 t}\,e^{j\omega t}$, i.e. signals whose envelope decays for $\sigma_0 < 0$ or grows for $\sigma_0 > 0$.

This viewpoint also clarifies the role of zeros. A zero located on the imaginary axis produces an exact null in the Fourier response at the corresponding frequency, since the surface meets the plane $|F(s)| = 0$ at that point.

Rotate the surface by dragging, and adjust $\sigma$ to translate the slice. The blue ridge denotes the Fourier cross-section; pink × mark poles and green ○ mark zeros.

0.00
84
jω ridge · Fourier slice at current σ × poles · spikes ○ zeros · valleys
|F(s)| · surface over the s-plane
drag to rotate
slice at σ = 0.00 · |F(σ + jω)|
top view · poles · σ slice line
10stability and pole location

Pole location determines the qualitative behaviour of the system.

For an LTI system, $H(s)$ is the Laplace transform of the impulse response $h(t)$. The location of each pole $p_i = \sigma_i + j\omega_i$ in the complex plane determines the contribution of the corresponding mode $e^{p_i t}$ to $h(t)$.

The green pole may be translated in the $s$-plane to observe the resulting change in the impulse response $h(t)$.

s-plane · drag the pole
impulse response $h(t)$
stable
11your turn

Pick an input, build a system, see what falls out.

Start by choosing an input $x(t)$ on the left. The poles and zeros that come along for the ride (the ones forced on you by the input itself) show up on the s-plane in yellow.

Then go build your own $H(s)$. Click the s-plane to drop poles (×) and zeros (), drag to move them around, shift-click to delete. The output $y(t)$ is the inverse Laplace of $X(s)\,H(s)$, computed live by integrating the underlying ODE on every frame.

1.00
1.00

Click empty space to drop a pole or zero. Drag to move, shift-click (or right-click) to delete. Anything you drop above the σ axis gets mirrored below it, since a real system's poles and zeros come in complex-conjugate pairs.

s-plane · build H(s) · input × ○ in yellow
H(s) · 0 zeros · 1 pole
x(t) input → y(t) output
stable response

Tweaks

bg
text
real
imag
time
accent
body pt
math pt
hero pt
canvas x
text x